package uk.co.q3c.deplan.client.ui.mock.view;

import uk.co.q3c.deplan.client.ui.mock.widget.MenuItemMock;
import uk.co.q3c.deplan.client.ui.view.Q3CoreView;
import uk.co.q3c.deplan.client.ui.view.ScreenPresenter;
import uk.co.q3c.deplan.client.ui.view.ScreenView;

import com.google.gwt.user.client.Command;

public class ScreenViewMock implements ScreenView {
	private final MenuItemMock mntmResources;
	private final MenuItemMock mntmProjects;
	private final MenuItemMock mntmHome;
	private Q3CoreView corePanel;
	private final ScreenPresenter screenPresenter;

	public ScreenViewMock() {
		super();
		this.screenPresenter = new ScreenPresenter(this);
		mntmResources = new MenuItemMock();
		mntmProjects = new MenuItemMock();
		mntmHome = new MenuItemMock();
	}

	@Override
	public void setCorePanel(Q3CoreView newView) {
		this.corePanel = newView;
	}

	public Q3CoreView corePanel() {
		return corePanel;
	}

	@Override
	public void setHomeMICommand(Command cmd) {
		mntmHome.setCommand(cmd);

	}

	@Override
	public void setProjectsMICommand(Command cmd) {
		mntmProjects.setCommand(cmd);

	}

	@Override
	public void setResourcesMICommand(Command cmd) {
		mntmResources.setCommand(cmd);

	}

	@Override
	public ScreenPresenter getPresenter() {
		return screenPresenter;
	}

}
